package com.qf.hospital.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.hibernate.validator.constraints.NotBlank;
import serializer.Integer2BooleanJsonSerializer;

import javax.validation.constraints.NotNull;

/**
 * @author Administrator
 * @version V1.0
 * @Project hospital
 * @Package com.qf.hospital.dto
 * @Description: ${TODO}
 * @Date 2021/10/19 21:55
 */
public class SysRoleDTO {

    /**
     * 角色id
     */
    @JsonSerialize(using = Integer2BooleanJsonSerializer.class)
    private Integer roleId;

    /**
     * 角色名称
     */
    @NotBlank(message = "角色名不能为空！")
    private String roleName;

    /**
     * 角色描述
     */
    @NotBlank(message = "角色描述不能为空！")
    private String roleDesc;

    /**
     * 0 - 不生效,1 - 生效
     */
    @NotNull(message = "角色状态不能为空！")
    private Integer available;

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }
    public void setRoleid(Integer roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }
    public void setRolename(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleDesc() {
        return roleDesc;
    }

    public void setRoleDesc(String roleDesc) {
        this.roleDesc = roleDesc;
    }
    public void setRoledesc(String roleDesc) {
        this.roleDesc = roleDesc;
    }

    public Integer getAvailable() {
        return available;
    }

    public void setAvailable(Integer available) {
        this.available = available;
    }

    @Override
    public String toString() {
        return "SysRoleDTO{" +
                "roleId=" + roleId +
                ", roleName='" + roleName + '\'' +
                ", roleDesc='" + roleDesc + '\'' +
                ", available=" + available +
                '}';
    }
}
